Data Modeling
supOS boasts of its data modeling based on the concept of UNS (Unified Namespace). Through building data models according to its hierarchy, meanwhile automatically generating MQTT topics with the same name, data can be easily retrieved in real time.
Data models under UNS are empty structures with mock data connected through SourceFlow, follow the order displayed in the image to complete the data flow.

Building Data Model
Building Models Manually
Based on simple folder-file structure, you can define the data hierarchy to a tree map.
Factory/workshop/equipment/CNC will be used as an example to demenstrate the process of building data models.
- Log in to supOS, and then select UNS > Namespace.
- Under Model, click
to add a folder (namespace).
- Extended Info: You can add extented information for the folder. Eg. unit.
- Template: You can select a template to inherit attributes from it. See Building Template.
- Generate Template: Click
to add an attribute to the folder, at the same time you can select to generate a same template for future use.

Apply the same operation, add folder workshop under Factory, and folder equipment under workshop.
- Select equipment, and then click
to add a file (data tag) under it.
- Data Type
Type | Description |
---|---|
Time Series | Receive real-time data and store it in TDEngine. |
Relational | Receive relational data and store it in a Postgres database. |
Calculation | Perform basic calculations on the added time series attributes. |
Aggregation | Aggregate the added data sources into JSON at a fixed frequency. |
Reference | Select an existing file and copy its attributes. |
- Attribute Generation Method
- Custom: Customize attributes.
- Template: Inherit attributes from the selected template.
- Reverse Generation: Use JSON text or connected databases to generate attributes with the same structure.
infoYou can connect databases under DevTools > DBConnect.

- Enter the information of the file, and then click Next.
- Select Persistance to enable history data storage, and then click Save.
By default, supOS generates a data flow with mock data in UNS > SourceFlow and a dashboard in System > Dashboards.

Generating Models through JSON
- Log in to supOS, and then select UNS > Namespace.
- Click
on the Model tab.
- Select the data type, and then write JSON text for the data model.
We will build a similar model for reference.
{
"Factory1": {
"workshop1": {
"equipment1": {
"CNC1": [
{
"actualRuntime1": 1380,
"plannedRuntime1": 1440
}
]
}
}
}
}

- Click Next, and select the model on the left side.
Click on each data level, you can change its information and add attributes on the right side.

- Click Save.
Importing Models
- Log in to supOS, and then select UNS > Namespace.
- Click Import at the upper-right corner, and then click Download Template.

- Fill in the template table.
You can manually add a folder and file, export it and use it as an example for import.

- Save the template table, and then click Import on the Namespace page.
- Select the template, and then click Save.
Building Template
- On the Namespace page, click Template.
- Click
, and then enter the information of the template.
Click Source to select added models and inherit their attributes.

- Click Save.
Creating Label
Labels are used for categorizing data models.
- On the Namespace page, click Label.
- Click
, and then enter the label name.
- Click Save, and then click
to add files under the label.

- Click Save.